package com.xiaoma.aes.exception;


/**
 * 业务异常处理类
 * @author Knight-Ran 2016年9月3日 下午2:43:16
 */
public class BusinessException extends RuntimeException{
    
    
    private static final long serialVersionUID = -853734473298420544L;
    
    
    /**
     * 对应ATSResponseCode 枚举中的name，用于监控日志
     */
    private String name;
    
    /**
     * 对应ATSResponseCode 枚举中的key
     */
    private String code;
    
    /**
     * 构造
     */
    public BusinessException(){}
    
    /**
     * 
     * @param message
     */
    public BusinessException(String message){
        super(message);
    }
    
    /**
     * @param name
     * @param code
     */
    public BusinessException(String name, String code){
        super(name);
        this.name = name;
        this.code = code;
    }
    
    
    /**
     * 
     * @param messge
     * @param e
     */
    public BusinessException(String messge, Throwable e){
        super(messge, e);
    }
    
    
    /**
     * @return the name
     */
    public String getName(){
        return name;
    }
    
    
    /**
     * @param name the name to set
     */
    public void setName(String name){
        this.name = name;
    }
    
    
    /**
     * @return the code
     */
    public String getCode(){
        return code;
    }
    
    
    /**
     * @param code the code to set
     */
    public void setCode(String code){
        this.code = code;
    }
    
    
}
